
\begin{tikzpicture}[>=latex,line join=bevel,]
  \pgfsetlinewidth{1bp}
%%
\pgfsetcolor{black}
  % Edge: (p,c2) -> (p,e)
  \pgfsetcolor{green}
  \draw [->] (238.35bp,88.264bp) .. controls (237.64bp,101.28bp) and (236.51bp,121.94bp)  .. (235.09bp,147.92bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (249bp,113.05bp) node {c2};
  % Edge: (p,c1) -> (p,e)
  \pgfsetcolor{green}
  \draw [->] (180.57bp,184.88bp) .. controls (188.99bp,181.07bp) and (199.13bp,176.47bp)  .. (217.48bp,168.15bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (199.46bp,191.59bp) node {c1};
  % Edge: (p,q4) -> (p,q5)
  \draw [->] (358.03bp,21.429bp) .. controls (350.59bp,21.473bp) and (342.25bp,21.523bp)  .. (324.09bp,21.632bp);
  \draw (346.15bp,10.5bp) node {q4};
  % Edge: (p,x) -> (p,r2)
  \pgfsetcolor{red}
  \draw [->] (467.13bp,166.88bp) .. controls (475.39bp,170.51bp) and (485.43bp,174.92bp)  .. (503.87bp,183.02bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (473.89bp,189.93bp) node {x: (p,c2), };
  % Edge: (p,r1) -> (p,q4)
  \draw [->] (431.43bp,63.765bp) .. controls (423.08bp,56.546bp) and (411.89bp,46.883bp)  .. (394.71bp,32.045bp);
  \draw (406.87bp,62.181bp) node {r1};
  % Edge: (p,q5) -> (p,c2)
  \draw [->] (287.69bp,32.702bp) .. controls (279.42bp,40.02bp) and (268.35bp,49.814bp)  .. (251.36bp,64.856bp);
  \draw (262.28bp,33.458bp) node {q5};
  % Edge: (p,e) -> (p,q2)
  \draw [->] (247.81bp,170.28bp) .. controls (256.85bp,176.9bp) and (269.02bp,185.81bp)  .. (287.91bp,199.64bp);
  \draw (270.68bp,171.9bp) node {e};
  % Edge: (p,x) -> (p,r1)
  \pgfsetcolor{red}
  \draw [->] (448.75bp,146.32bp) .. controls (447.87bp,133.32bp) and (446.5bp,112.96bp)  .. (444.77bp,87.24bp);
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (429.09bp,122.78bp) node {x: (p,c1), };
  % Edge: (p,q3) -> (p,x)
  \draw [->] (396.36bp,199.21bp) .. controls (405.49bp,192.35bp) and (417.61bp,183.24bp)  .. (436.17bp,169.28bp);
  \draw (403.17bp,174.33bp) node {q3};
  % Edge: (p,main) -> (p,q1)
  \draw [->] (48.197bp,250.18bp) .. controls (54.747bp,246.27bp) and (62.345bp,241.74bp)  .. (78.052bp,232.36bp);
  \draw (50.82bp,228.84bp) node {main};
  % Edge: (p,q2) -> (p,q3)
  \draw [->] (326.29bp,209.98bp) .. controls (333.19bp,209.94bp) and (340.85bp,209.9bp)  .. (358.39bp,209.81bp);
  \draw (337.26bp,198.92bp) node {q2};
  % Edge: (p,q6) -> (p,exit)
  \draw [->] (608.85bp,229.34bp) .. controls (614.82bp,231.83bp) and (621.58bp,234.65bp)  .. (637.43bp,241.25bp);
  \draw (623.49bp,219.36bp) node {q6};
  % Edge: (p,r2) -> (p,q6)
  \draw [->] (539.86bp,199bp) .. controls (546.73bp,202.08bp) and (554.74bp,205.67bp)  .. (571.57bp,213.22bp);
  \draw (546.09bp,217.04bp) node {r2};
  % Edge: (p,q1) -> (p,c1)
  \draw [->] (112.64bp,214.74bp) .. controls (119.29bp,211.86bp) and (126.92bp,208.54bp)  .. (143.72bp,201.24bp);
  \draw (129.41bp,224.06bp) node {q1};
  % Node: (p,x)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (450bp,159bp) ellipse (22bp and 13bp);
  \draw (449.61bp,159.18bp) node {(p,x)};
\end{scope}
  % Node: (p,c2)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (239bp,76bp) ellipse (24bp and 13bp);
  \draw (239.03bp,75.765bp) node {(p,c2)};
\end{scope}
  % Node: (p,e)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (234bp,160bp) ellipse (21bp and 13bp);
  \draw (234.41bp,160.47bp) node {(p,e)};
\end{scope}
  % Node: (p,r2)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (522bp,191bp) ellipse (23bp and 13bp);
  \draw (521.98bp,190.99bp) node {(p,r2)};
\end{scope}
  % Node: (p,c1)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (162bp,193bp) ellipse (24bp and 13bp);
  \draw (162.4bp,193.12bp) node {(p,c1)};
\end{scope}
  % Node: (p,q1)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (94bp,223bp) ellipse (24bp and 13bp);
  \draw (93.933bp,222.87bp) node {(p,q1)};
\end{scope}
  % Node: (p,exit)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (658bp,250bp) ellipse (27bp and 13bp);
  \draw (657.55bp,249.63bp) node {(p,exit)};
\end{scope}
  % Node: (p,q2)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (302bp,210bp) ellipse (24bp and 13bp);
  \draw (302.22bp,210.11bp) node {(p,q2)};
\end{scope}
  % Node: (p,q3)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (382bp,210bp) ellipse (24bp and 13bp);
  \draw (382.45bp,209.68bp) node {(p,q3)};
\end{scope}
  % Node: (p,q4)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (382bp,21bp) ellipse (24bp and 13bp);
  \draw (382.26bp,21.283bp) node {(p,q4)};
\end{scope}
  % Node: (p,main)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (31bp,260bp) ellipse (30bp and 13bp);
  \draw (31bp,260.45bp) node {(p,main)};
\end{scope}
  % Node: (p,q5)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (300bp,22bp) ellipse (24bp and 13bp);
  \draw (300.04bp,21.777bp) node {(p,q5)};
\end{scope}
  % Node: (p,q6)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (590bp,222bp) ellipse (24bp and 13bp);
  \draw (590.04bp,221.5bp) node {(p,q6)};
\end{scope}
  % Node: (p,r1)
\begin{scope}
  \definecolor{strokecol}{rgb}{0.0,0.0,0.0};
  \pgfsetstrokecolor{strokecol}
  \draw (444bp,75bp) ellipse (23bp and 13bp);
  \draw (443.91bp,74.542bp) node {(p,r1)};
\end{scope}
%
\end{tikzpicture}
